package com.itheima.reggie.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.reggie.dto.OrdersDto;
import com.itheima.reggie.entity.Orders;
import org.springframework.format.annotation.DateTimeFormat;

import javax.servlet.http.HttpSession;
import java.time.LocalDateTime;

/**
 * @Author Pan Rundong
 * @Date 2023-02-02 10:10
 * @Desc 订单Service
 */
public interface OrdersService extends IService<Orders> {
    /**
     * 用户下单
     *
     * @param orders
     * @return void
     * @Author: Pan Rundong
     * @Date: 2023-02-02 10:27
     * @Greet2u: （O｀ 3′O）~~♡
     */
    Orders submit(Orders orders);

    /**
     * 订单查询
     * @Author: Pan Rundong
     * @Date: 2023-02-05 21:37
     * @Greet2u:  （O｀ 3′O）~~♡
     * @param page
     * @param pageSize
     * @param id
     * @param beginTime
     * @param endTime
     * @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.itheima.reggie.dto.OrdersDto>
     */
    Page<OrdersDto> getPage(int page, int pageSize, Long id, LocalDateTime beginTime, LocalDateTime endTime);

    /**
     * 历史订单
     * @Author: Pan Rundong
     * @Date: 2023-02-06 9:10
     * @Greet2u:  （O｀ 3′O）~~♡
     * @param page
     * @param pageSize
     * @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.itheima.reggie.dto.OrdersDto>
     */
    Page<OrdersDto> getPage(int page, int pageSize);

    /**
     * 修改订单状态
     * @Author: Pan Rundong
     * @Date: 2023-02-06 9:43
     * @Greet2u:  （O｀ 3′O）~~♡
     * @param ordersDto
     * @return void
     */
    void updateStatus(OrdersDto ordersDto);
}
